package com.bonc.apim.dao;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.transaction.annotation.Transactional;

import com.bonc.apim.entity.ApplicationApprove;

/**
 * app审核查询
 * 
 * @author wjx
 */
@Transactional
public interface ApplicationApproveDao extends JpaRepository<ApplicationApprove, Long> {

    public List<ApplicationApprove> findByApplicationNameAndApplicationCreatorAndApproveCreatorAndApproveTypeAndApiApproveStatus(
            String applicationName, String applicationCreator, String approveCreator, Integer approveType, int apiApproveStatus);

    public ApplicationApprove findByProInsId(String flowInstId);

    public ApplicationApprove findById(Long id);
//
//    /** 分页 模糊 排序查询 */
//    public Page<ApplicationApprove> findBySubscriberAndApiNameContainingOrderByApiApproveStartTimeDesc(Pageable pageAble, String subscriber, String apiName);
//
//    public Page<ApplicationApprove> findBySubscriberAndApiApproveStatusAndApiNameContaining(Pageable pageAble, String subscriber,
//            Integer apiApproveStatus, String apiName);

}
